package com.example.demo.dao;

import com.example.demo.entity.ProductCategory;
import com.example.demo.mapper.CategoryMapper;
import com.example.demo.mapper.ProductCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * Created by hongzhenyue on 18/3/2.
 */
public class ProductCategoryDao {
//    @Autowired
//    private ProductCategoryMapper productCategoryMapper;
//
//    public List<ProductCategory> findByCategoryType(Integer type) {
//        return productCategoryMapper.findByCategoryType(type);
//    }
    @Autowired
    private CategoryMapper categoryMapper;

    public ProductCategory findByCategoryType(Integer type) {
        return categoryMapper.findByCategoryType(type);
    }
}
